import request from '../../utils/request';

export const sendSmsCode = phone => {
  console.log('service sendSmsCode phone',phone);
  return request('user/smsCode', {
    method: 'POST',
    data: { phone }
  })
};
export const getUserInfo = () => request('user/info_from_weapp', {
  method: 'GET',
});
export const checkSmsCode = ({ phone, code })=> {
  console.log('service sendSmsCode phone',phone);
  console.log('service sendSmsCode code',code);
  return request('user/bindPhoneBySmsCode', {
    method: 'POST',
    data: { phone,code }
  })
};
